////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                                                                            //
//                                                         WNProject                                                          //
//                                                                                                                            //
//            This file is distributed under the BSD 2-Clause open source license. See License.txt for details.               //
//                                                                                                                            //
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#include "WNGraphics/inc/WNGraphicsDeviceFactory.h"
#include "WNGraphics/inc/WNGraphicsDevice.h"
#include "WNMemory/inc/WNAllocation.h"

#ifdef _WN_WINDOWS
    #include "WNGraphics/inc/WND3D11GraphicsDevice.h"
#elif defined _WN_LINUX
    #include "WNGraphics/inc/WNGLXGraphicsDevice.h"
#endif

using namespace WNGraphics;
using namespace WNMemory;

WNGraphicsDevice* WNGraphicsDeviceFactory::CreateGraphicsDevice(WNGraphicsResourceFactory* _resourceFactory) {
    #ifdef _WN_WINDOWS
        return(WN_NEW(WND3D11GraphicsDevice(_resourceFactory)));
    #elif defined _WN_LINUX
        return(WN_NEW(WNGLXGraphicsDevice(_resourceFactory)));
    #endif
}
